<?php 

/**
 * Joomla! 1.5 component arts_curriculum
 * @package    arts_curriculum
 * @subpackage 
 * @author     Chris Borkowski {@link http://www.guggenheim.org}
 * @author     Created on 31-August-2009
 */

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

JHTML::_('behavior.tooltip');
// Set toolbar items for the page
	  $edit = JRequest :: getVar('edit', true);
	  $text = !$edit ? JText :: _('New') : JText :: _('Edit');
	  JToolBarHelper :: title(JText :: _('Item') . ': <small>[ ' . $text . ' ]</small>');
	  JToolBarHelper :: save();
	  JToolBarHelper :: apply();
	  if (!$edit) {
	  JToolBarHelper :: cancel();
	  } else {
	  JToolBarHelper :: cancel('cancel', 'Close');
	  }
	  
	  
	?>
	<script language="javascript" type="text/javascript">
	<!--
	 function submitbutton(pressbutton) {
	  var form = document.adminForm;
	  if (pressbutton == 'cancel') {
	  submitform( pressbutton );
	  return;
	  }
	 // do field validation
	  if (form.title.value == ""){
	  alert( "<?php echo JText::_( 'Please give a title', true ); ?>" );
	  } else if (form.catid.value == "0"){
	  alert( "<?php echo JText::_( 'Please select a category', true ); ?>" );
	  } else {
	  submitform( pressbutton );
	  }
	  }
	  -->
	</script>

<form action="index.php" method="post" name="adminForm" id="adminForm"  enctype="multipart/form-data">

	<fieldset class="adminform">
	<legend><?php echo JText::_( 'Publication Details' ); ?></legend>
	<table class="admintable" cellspacing="0" cellpadding="0" border="0" width="100%">
	
	<tr>
	<td width="100" align="right" class="key"><label for="title"><?php echo JText::_( 'Title' ); ?>:</label></td>
	<td><input class="text_area" type="text" name="title" id="title" size="48" maxlength="250" value="<?php echo $this->item->title;?>" /></td>
    </tr>

	<tr>
	<td width="100" align="right" class="key"><label for="alias"><?php echo JText::_( 'Alias' ); ?>:</label></td>
	<td><input class="text_area" type="text" name="alias" id="alias" size="32" maxlength="250" value="<?php echo $this->item->alias;?>" /></td>
	</tr>
	
	<tr>
	<td valign="top" align="right" class="key"><?php echo JText::_( 'Published' ); ?>:</td>
	<td><?php echo $this->lists['published']; ?></td>
	</tr>
	
	<tr>
	<td valign="top" align="right" class="key"><label for="catid"><?php echo JText::_( 'Exhibition/Theme' ); ?>:</label></td>
	<td><?php echo $this->lists['catid']; ?></td>
	</tr>
	
	<tr>
	<td valign="top" align="right" class="key"><label for="ordering"><?php echo JText::_( 'Ordering' ); ?>:</label></td>
	<td><?php echo $this->lists['ordering']; ?></td>
	</tr>
	
	</table>
	</fieldset>


		<fieldset class="adminform">
		<legend><?php echo JText::_( 'Custom Fields' ); ?></legend>
		
		
		<table class="admintable" width="100%">
		 <tr>
		<td width="100" align="right" class="key">
		<label for="lesson_number">
		<?php echo JText::_( 'Lesson Number' ); ?>:
		</label>
		</td>
		<td>
		<input class="text_area" type="text" name="lesson_number" id="lesson_number" size="32" maxlength="250" value="<?php echo $this->item->lesson_number;?>" />
		</td>
		</tr>
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="lesson_name">
		<?php echo JText::_( 'Lesson Title' ); ?>:
		</label>
		</td>
		<td>
		<input class="text_area" type="text" name="lesson_name" id="lesson_name" size="32" maxlength="250" value="<?php echo $this->item->lesson_name;?>" />
		</td>
		</tr>
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="exhibit_name">
		<?php echo JText::_( 'Exhibition Title' ); ?>:
		</label>
		</td>
		<td>
		<input class="text_area" type="text" name="exhibit_name" id="exhibit_name" size="32" maxlength="250" value="<?php echo $this->item->exhibit_name;?>" />
		</td>
		</tr>
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="artist_name">
		<?php echo JText::_( 'Artist Name' ); ?>:
		</label>
		</td>
		<td>
		<input class="text_area" type="text" name="artist_name" id="artist_name" size="32" maxlength="250" value="<?php echo $this->item->artist_name;?>" />
		</td>
		</tr>
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="subject">
		<?php echo JText::_( 'Subject' ); ?>:
		</label>
		</td>
		<td>
		<input class="text_area" type="text" name="subject" id="subject" size="32" maxlength="250" value="<?php echo $this->item->subject;?>" />
		</td>
		</tr>
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="medium">
		<?php echo JText::_( 'Medium' ); ?>:
		</label>
		</td>
		<td>
		<input class="text_area" type="text" name="medium" id="medium" size="32" maxlength="250" value="<?php echo $this->item->medium;?>" />
		</td>
		</tr>
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="article_title">
		<?php echo JText::_( 'Article Title' ); ?>:
		</label>
		</td>
		<td>
		<input class="text_area" type="text" name="article_title" id="article_title" size="32" maxlength="250" value="<?php echo $this->item->article_title;?>" />
		</td>
		</tr>
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="main_body">
		<?php echo JText::_( 'Teacher Information' ); ?>:
		</label>
		</td>
		<td>
		<?php echo $this->editor->display( 'main_body',  $this->item->main_body , '100%', '550', '500', '5' ) ;?>
		</td>
		</tr>
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="view_n_dis">
		<?php echo JText::_( 'View And Discuss' ); ?>:
		</label>
		</td>
		<td>
		<?php echo $this->editor->display( 'view_n_dis',  $this->item->view_n_dis , '100%', '550', '500', '5' ) ;?>
		</td>
		</tr>
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="further_reading">
		<?php echo JText::_( 'Further Explorations' ); ?>:
		</label>
		</td>
		<td>
		<?php echo $this->editor->display( 'further_reading',  $this->item->further_reading , '100%', '550', '500', '5' ) ;?>
		</td>
		</tr>
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="further_reading">
		<?php echo JText::_( 'Additional Resources' ); ?>:
		</label>
		</td>
		<td>
		<?php echo $this->editor->display( 'additional_resources',  $this->item->additional_resources , '100%', '550', '500', '5' ) ;?>
		</td>
		</tr>
		
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="further_reading">
		<?php echo JText::_( 'Vocabulary' ); ?>:
		</label>
		</td>
		<td>
		<?php echo $this->editor->display( 'vocabulary',  $this->item->vocabulary , '100%', '550', '500', '5' ) ;?>
		</td>
		</tr>
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="notes">
		<?php echo JText::_( 'Notes' ); ?>:
		</label>
		</td>
		<td>
		<input class="text_area" type="text" name="notes" id="notes" size="32" maxlength="250" value="<?php echo $this->item->notes;?>" />
		</td>
		</tr>

		</table>
		</fieldset>
		
	
		<!-- BEGIN MEDIA MANAGER -->
		<fieldset class="adminform">
		
		<table class="admintable" width="100%">
		 <tr>
		<td width="100" align="right" class="key">
		<label for="image1">
		<?php echo JText::_( 'Image 1' ); ?>:
		</label>
		</td>
		<td>
		<?php if ($this->item->image1 !=''): ?>
		<img src="/images/content/arts_curriculum/masters/<?php echo $this->item->image1;?>" />
		<p> FILE NAME: <?php echo $this->item->image1;?> </p>
		<?php endif ?>
		</td>
		</tr>
		
	    <tr>
        <td width="100" align="right" class="key">
        <label for="imgcap1"><?php echo JText::_( 'Image 1 Caption' ); ?>:
		</label>
        </td>
        <td>
        <textarea class="text_area" cols="20" rows="4" name="imgcap1" id="imgcap1" style="width:500px"><?php echo $this->item->imgcap1; ?></textarea>
        </td>
       </tr>
       <tr>
		
		
		<tr>
      	<td width="100" align="right" class="key">
        <?php echo JText::_( 'Upload Image 1' ); ?>
      	</td>
      	<td>
        <input type="file" name="imagefile1" value="" />
      	</td>
    	</tr>
		
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="image2">
		<?php echo JText::_( 'Image 2' ); ?>:
		</label>
		</td>
		<td>
		<?php if ($this->item->image2 !=''): ?>
		<img src="/images/content/arts_curriculum/masters/<?php echo $this->item->image2;?>" />
		<p> FILE NAME: <?php echo $this->item->image2;?> </p>
		<?php endif ?></td>
		</tr>
		
		
		<tr>
        <td width="100" align="right" class="key">
       	<label for="imgcap2"><?php echo JText::_( 'Image 2 Caption' ); ?>:
		</label>
        </td>
        <td>
        <textarea class="text_area" cols="20" rows="4" name="imgcap2" id="imgcap2" style="width:500px"><?php echo $this->item->imgcap2; ?></textarea>
        </td>
       	</tr>
      	 <tr>
		
		
		<tr>
      	<td width="100" align="right" class="key">
        <?php echo JText::_( 'Upload Image 2' ); ?>
      	</td>
      	<td>
        <input type="file" name="imagefile2" value="" />
      	</td>
    	</tr>
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="image3">
		<?php echo JText::_( 'Image 3' ); ?>:
		</label>
		</td>
		<td>
		<?php if ($this->item->image3 !=''): ?>
		<img src="/images/content/arts_curriculum/masters/<?php echo $this->item->image3;?>" />
		<p> FILE NAME: <?php echo $this->item->image3;?> </p>
		<?php endif ?>
		</td>
		</tr>
		
		
		<tr>
        <td width="100" align="right" class="key">
         <label for="imgcap3"><?php echo JText::_( 'Image 3 Caption' ); ?>
		</label>
        </td>
        <td>
        <textarea class="text_area" cols="20" rows="4" name="imgcap3" id="imgcap3" style="width:500px"><?php echo $this->item->imgcap3; ?></textarea>
        </td>
        </tr>
        <tr>
		
		
		
		<tr>
      	<td width="100" align="right" class="key">
        <?php echo JText::_( 'Upload Image 3' ); ?>
      	</td>
      	<td>
        <input type="file" name="imagefile3" value="" />
      	</td>
    	</tr>
		
		<tr>
		<td width="100" align="right" class="key">
		<label for="image4">
		<?php echo JText::_( 'Image 4' ); ?>
		</label>
		</td>
		<td>
		<?php if ($this->item->image4 !=''): ?>
		<img src="/images/content/arts_curriculum/masters/<?php echo $this->item->image4;?>" />
		<p> FILE NAME: <?php echo $this->item->image4;?> </p>
		<?php endif ?>
		</td>
		</tr>
		
		<tr>
        <td width="100" align="right" class="key">
        <label for="imgcap4"><?php echo JText::_( 'Image 4 Caption' ); ?>:
		</label>
        </td>
        <td>
        <textarea class="text_area" cols="20" rows="4" name="imgcap4" id="imgcap4" style="width:500px"><?php echo $this->item->imgcap4; ?></textarea>
        </td>
        </tr>
        <tr>
		
		
		
		<tr>
      	<td width="100" align="right" class="key">
        <?php echo JText::_( 'Upload Image 4' ); ?>
      	</td>
      	<td>
        <input type="file" name="imagefile4" value="" />
      	</td>
    	</tr>
		
		<!-- we may never use this but it's here -->
		<tr>
		<td width="100" align="right" class="key">
		</td>
		<td>
		<hr>
		<strong> NOT IN USE YET </strong>
		<hr>
		</td></tr>
		
		
		<td width="100" align="right" class="key">
		
		<label for="asset1">
		<?php echo JText::_( 'Asset 1' ); ?>:
		</label>
		</td>
		<td>
		<input class="text_area" type="text" name="asset1" id="asset1" size="32" maxlength="250" value="<?php echo $this->item->asset1;?>" />
		</td>
		</tr>
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="asset2">
		<?php echo JText::_( 'Asset 2' ); ?>:
		</label>
		</td>
		<td>
		<input class="text_area" type="text" name="asset2" id="asset2" size="32" maxlength="250" value="<?php echo $this->item->asset2;?>" />
		</td>
		</tr>
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="asset3">
		<?php echo JText::_( 'Asset 3' ); ?>:
		</label>
		</td>
		<td>
		<input class="text_area" type="text" name="asset3" id="asset3" size="32" maxlength="250" value="<?php echo $this->item->asset3;?>" />
		</td>
		</tr>
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="asset4">
		<?php echo JText::_( 'Asset 4' ); ?>:
		</label>
		</td>
		<td>
		<input class="text_area" type="text" name="asset4" id="asset4" size="32" maxlength="250" value="<?php echo $this->item->asset4;?>" />
		</td>
		</tr>
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="video1">
		<?php echo JText::_( 'Video 1' ); ?>:
		</label>
		</td>
		<td>
		<input class="text_area" type="text" name="video1" id="video1" size="32" maxlength="250" value="<?php echo $this->item->video1;?>" />
		</td>
		</tr>
		
		 <tr>
		<td width="100" align="right" class="key">
		<label for="video2">
		<?php echo JText::_( 'Video 2' ); ?>:
		</label>
		</td>
		<td>
		<input class="text_area" type="text" name="video2" id="video2" size="32" maxlength="250" value="<?php echo $this->item->video2;?>" />
		</td>
		</tr>
		
		<tr>
		<td width="100" align="right" class="key">
		<label for="audio1">
		<?php echo JText::_( 'Audio 1' ); ?>:
		</label>
		</td>
		<td>
		<input class="text_area" type="text" name="audio1" id="audio1" size="32" maxlength="250" value="<?php echo $this->item->audio1;?>" />
		</td>
		</tr>
		
		<tr>
		<td width="100" align="right" class="key">
		<label for="audio2">
		<?php echo JText::_( 'Audio 2' ); ?>:
		</label>
		</td>
		<td>
		<input class="text_area" type="text" name="audio2" id="audio2" size="32" maxlength="250" value="<?php echo $this->item->audio2;?>" />
		</td>
		</tr>
		 
		 
		 </table>
		  </fieldset>
		
				<fieldset class="adminform">
				<legend><?php echo JText::_( 'Parameters' ); ?></legend>
				
						<table class="admintable">
						<tr>
							<td>
								<?php echo $this->params->render();?>
							</td>
						</tr>
						</table>
					</fieldset>

		
<input type="hidden" name="option" value="com_arts_curriculum" />
<input type="hidden" name="cid[]" value="<?php echo $this->item->id; ?>" />
<input type="hidden" name="task" value="" />
</form>